Skip to content

Conversation

CharlesGueunet
Copy link

Fixes #907

@CharlesGueunet
Copy link
Author

@danielshahaf please review

(( i += REPLY ))
(( i += $REPLY ))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch. Unfortunately, it's not a complete fix.

Arithmetic expressions are parsed for substitutions and then, in a second pass, evaluate identifiers into their values. Thus, the incumbent code is correct, and even idiomatic (consider foo=2+2; echo $((foo*2)) $(($foo*2))), and conversely, the patch would seem to merely paper over the issue.

I'm curious why it works, but we can discuss that back on the issue's ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_zsh_highlight_main_highlighter_highlight_double_quote:47: bad math expression
2 participants